package drds.global_transaction.global_transaction_manager.api;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DefaultGlobalTransactionFailureHandlerImpl implements GlobalTransactionFailureHandler
{

	@Override
	public void onGlobalTransactionBeginFailure(GlobalTransaction globalTransaction, Throwable cause)
	{
		log.warn("failed to global transaction begin . ", cause);
	}

	@Override
	public void onGlobalTransactionCommitFailure(GlobalTransaction globalTransaction, Throwable cause)
	{
		log.warn("failed to global transaction commit [" + globalTransaction.getGlobalTransactionIdWithAddressAndPort() + "]", cause);
	}

	@Override
	public void onGlobalTransactionRollbackFailure(GlobalTransaction globalTransaction, Throwable cause)
	{
		log.warn("failed to global transaction rollback [" + globalTransaction.getGlobalTransactionIdWithAddressAndPort() + "]", cause);
	}
}
